﻿using System;

namespace Xin478.MySocket
{
    public interface IClient
    {
        event NetEventHandler OnConnectedServerEvent;
        event NetEventHandler OnReceivedDatagramEvent;
        event NetEventHandler OnDisConnectedServerEvent;

        IDatagramAnalyze DatagramAnalyze{get;set;}
        Session ClientSession { get; }
        bool IsConnected { get; }

        void Connect(string ip, int port);
        void Send(byte[] datagram);
        void Close();
    }
}
